@echo off
echo ==========================================
echo   Full-Stack Login Application Starter
echo ==========================================
echo.
echo 1. Starting Backend Server...
cd web
start "Backend Server" cmd /k "mvn spring-boot:run"
cd ..

echo.
echo 2. Starting Frontend Development Server...
cd front
start "Frontend Server" cmd /k "npm run dev"
cd ..

echo.
echo 3. Servers are starting in separate windows:
echo    - Backend:  http://localhost:8080
echo    - Frontend: http://localhost:3000
echo.
echo 4. Please wait for both servers to fully start
echo    (Backend: you'll see "Started WebApplication")
echo    (Frontend: you'll see "Available on")
echo.
echo 5. Then open: http://localhost:3000 in your browser
echo.
echo 6. Test accounts:
echo    - Username: admin, Password: 123456
echo    - Username: test, Password: 123456
echo    - Username: user1, Password: 123456
echo.
echo ==========================================
echo Press any key to exit...
echo ==========================================
pause